package com.wondersgroup.fjzlpt.console.constant;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;

/**
 * Created by lion on 2017/5/23.
 */
public enum MenuActionType {

    PAGE_BTN("01", "页面按钮")
    ,TABLE_COL("02", "表格操作列");

    private String XMDM;
    private String XMMC;

    private MenuActionType(String XMDM, String XMMC)
    {
        this.XMDM = XMDM;
        this.XMMC = XMMC;
    }

    public static JSONArray getAll()
    {
        JSONArray jsonAry = new JSONArray();
        MenuActionType[] ary = MenuActionType.class.getEnumConstants();
        for(MenuActionType rs: ary)
        {
            JSONObject json = new JSONObject(2);
            json.put("XMDM", rs.XMDM);
            json.put("XMMC", rs.XMMC);
            jsonAry.add(json);
        }
        return jsonAry;
    }
}
